Integrand size = 30, antiderivative size = 316 \[ \int \frac {f+g x+h x^2}{(d+e x)^2 \left (a+b x+c x^2\right )} \, dx=-\frac {e^2 f-d e g+d^2 h}{e \left (c d^2-b d e+a e^2\right ) (d+e x)}-\frac {\left (2 c^2 d^2 f+2 a^2 e^2 h-a b e (e g+2 d h)+b^2 \left (e^2 f+d^2 h\right )-c \left (b d (2 e f+d g)+2 a \left (e^2 f-2 d e g+d^2 h\right )\right )\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (c d^2-b d e+a e^2\right )^2}+\frac {\left (c d (2 e f-d g)+a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )\right ) \log (d+e x)}{\left (c d^2-b d e+a e^2\right )^2}-\frac {\left (c d (2 e f-d g)+a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )\right ) \log \left (a+b x+c x^2\right )}{2 \left (c d^2-b d e+a e^2\right )^2} \]
(-d^2*h+d*e*g-e^2*f)/e/(a*e^2-b*d*e+c*d^2)/(e*x+d)+(c*d*(-d*g+2*e*f)+a*e*( -2*d*h+e*g)-b*(-d^2*h+e^2*f))*ln(e*x+d)/(a*e^2-b*d*e+c*d^2)^2-1/2*(c*d*(-d *g+2*e*f)+a*e*(-2*d*h+e*g)-b*(-d^2*h+e^2*f))*ln(c*x^2+b*x+a)/(a*e^2-b*d*e+ c*d^2)^2-(2*c^2*d^2*f+2*a^2*e^2*h-a*b*e*(2*d*h+e*g)+b^2*(d^2*h+e^2*f)-c*(b *d*(d*g+2*e*f)+2*a*(d^2*h-2*d*e*g+e^2*f)))*arctanh((2*c*x+b)/(-4*a*c+b^2)^ (1/2))/(a*e^2-b*d*e+c*d^2)^2/(-4*a*c+b^2)^(1/2)
Time = 0.30 (sec) , antiderivative size = 281, normalized size of antiderivative = 0.89 \[ \int \frac {f+g x+h x^2}{(d+e x)^2 \left (a+b x+c x^2\right )} \, dx=\frac {-\frac {2 \left (c d^2+e (-b d+a e)\right ) \left (e^2 f-d e g+d^2 h\right )}{e (d+e x)}+\frac {2 \left (2 c^2 d^2 f+2 a^2 e^2 h-a b e (e g+2 d h)+b^2 \left (e^2 f+d^2 h\right )-c \left (b d (2 e f+d g)+2 a \left (e^2 f-2 d e g+d^2 h\right )\right )\right ) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}+2 \left (c d (2 e f-d g)+a e (e g-2 d h)+b \left (-e^2 f+d^2 h\right )\right ) \log (d+e x)+\left (c d (-2 e f+d g)+a e (-e g+2 d h)+b \left (e^2 f-d^2 h\right )\right ) \log (a+x (b+c x))}{2 \left (c d^2+e (-b d+a e)\right )^2} \]
((-2*(c*d^2 + e*(-(b*d) + a*e))*(e^2*f - d*e*g + d^2*h))/(e*(d + e*x)) + ( 2*(2*c^2*d^2*f + 2*a^2*e^2*h - a*b*e*(e*g + 2*d*h) + b^2*(e^2*f + d^2*h) - c*(b*d*(2*e*f + d*g) + 2*a*(e^2*f - 2*d*e*g + d^2*h)))*ArcTan[(b + 2*c*x) /Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] + 2*(c*d*(2*e*f - d*g) + a*e*(e*g - 2*d*h) + b*(-(e^2*f) + d^2*h))*Log[d + e*x] + (c*d*(-2*e*f + d*g) + a*e *(-(e*g) + 2*d*h) + b*(e^2*f - d^2*h))*Log[a + x*(b + c*x)])/(2*(c*d^2 + e *(-(b*d) + a*e))^2)
Time = 0.79 (sec) , antiderivative size = 316, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {2159, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {f+g x+h x^2}{(d+e x)^2 \left (a+b x+c x^2\right )} \, dx\) |
\(\Big \downarrow \) 2159 |
\(\displaystyle \int \left (\frac {e^2 \left (a^2 h-a b g+b^2 f\right )-c x \left (a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )+c d (2 e f-d g)\right )-c \left (a \left (d^2 h-2 d e g+e^2 f\right )+2 b d e f\right )+c^2 d^2 f}{\left (a+b x+c x^2\right ) \left (a e^2-b d e+c d^2\right )^2}+\frac {d^2 h-d e g+e^2 f}{(d+e x)^2 \left (a e^2-b d e+c d^2\right )}+\frac {e \left (a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )+c d (2 e f-d g)\right )}{(d+e x) \left (a e^2-b d e+c d^2\right )^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (2 a^2 e^2 h-c \left (2 a \left (d^2 h-2 d e g+e^2 f\right )+b d (d g+2 e f)\right )-a b e (2 d h+e g)+b^2 \left (d^2 h+e^2 f\right )+2 c^2 d^2 f\right )}{\sqrt {b^2-4 a c} \left (a e^2-b d e+c d^2\right )^2}-\frac {\log \left (a+b x+c x^2\right ) \left (a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )+c d (2 e f-d g)\right )}{2 \left (a e^2-b d e+c d^2\right )^2}-\frac {d^2 h-d e g+e^2 f}{e (d+e x) \left (a e^2-b d e+c d^2\right )}+\frac {\log (d+e x) \left (a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )+c d (2 e f-d g)\right )}{\left (a e^2-b d e+c d^2\right )^2}\) |
-((e^2*f - d*e*g + d^2*h)/(e*(c*d^2 - b*d*e + a*e^2)*(d + e*x))) - ((2*c^2 *d^2*f + 2*a^2*e^2*h - a*b*e*(e*g + 2*d*h) + b^2*(e^2*f + d^2*h) - c*(b*d* (2*e*f + d*g) + 2*a*(e^2*f - 2*d*e*g + d^2*h)))*ArcTanh[(b + 2*c*x)/Sqrt[b ^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*(c*d^2 - b*d*e + a*e^2)^2) + ((c*d*(2*e*f - d*g) + a*e*(e*g - 2*d*h) - b*(e^2*f - d^2*h))*Log[d + e*x])/(c*d^2 - b* d*e + a*e^2)^2 - ((c*d*(2*e*f - d*g) + a*e*(e*g - 2*d*h) - b*(e^2*f - d^2* h))*Log[a + b*x + c*x^2])/(2*(c*d^2 - b*d*e + a*e^2)^2)
3.2.53.3.1 Defintions of rubi rules used
Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p _.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x ], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
Time = 0.72 (sec) , antiderivative size = 346, normalized size of antiderivative = 1.09
method | result | size |
default | \(-\frac {d^{2} h -d e g +e^{2} f}{\left (e^{2} a -b d e +c \,d^{2}\right ) e \left (e x +d \right )}-\frac {\left (2 a d e h -a \,e^{2} g -b \,d^{2} h +b \,e^{2} f +c \,d^{2} g -2 c d e f \right ) \ln \left (e x +d \right )}{\left (e^{2} a -b d e +c \,d^{2}\right )^{2}}+\frac {\frac {\left (2 a c d h e -a c \,e^{2} g -b c \,d^{2} h +b c \,e^{2} f +c^{2} d^{2} g -2 c^{2} d e f \right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (a^{2} e^{2} h -a b \,e^{2} g -a c \,d^{2} h +2 a c d e g -a c \,e^{2} f +b^{2} e^{2} f -2 b c d e f +c^{2} d^{2} f -\frac {\left (2 a c d h e -a c \,e^{2} g -b c \,d^{2} h +b c \,e^{2} f +c^{2} d^{2} g -2 c^{2} d e f \right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{\left (e^{2} a -b d e +c \,d^{2}\right )^{2}}\) | \(346\) |
risch | \(\text {Expression too large to display}\) | \(1663\) |
-(d^2*h-d*e*g+e^2*f)/(a*e^2-b*d*e+c*d^2)/e/(e*x+d)-(2*a*d*e*h-a*e^2*g-b*d^ 2*h+b*e^2*f+c*d^2*g-2*c*d*e*f)/(a*e^2-b*d*e+c*d^2)^2*ln(e*x+d)+1/(a*e^2-b* d*e+c*d^2)^2*(1/2*(2*a*c*d*e*h-a*c*e^2*g-b*c*d^2*h+b*c*e^2*f+c^2*d^2*g-2*c ^2*d*e*f)/c*ln(c*x^2+b*x+a)+2*(a^2*e^2*h-a*b*e^2*g-a*c*d^2*h+2*a*c*d*e*g-a *c*e^2*f+b^2*e^2*f-2*b*c*d*e*f+c^2*d^2*f-1/2*(2*a*c*d*e*h-a*c*e^2*g-b*c*d^ 2*h+b*c*e^2*f+c^2*d^2*g-2*c^2*d*e*f)*b/c)/(4*a*c-b^2)^(1/2)*arctan((2*c*x+ b)/(4*a*c-b^2)^(1/2)))
Timed out. \[ \int \frac {f+g x+h x^2}{(d+e x)^2 \left (a+b x+c x^2\right )} \, dx=\text {Timed out} \]
Timed out. \[ \int \frac {f+g x+h x^2}{(d+e x)^2 \left (a+b x+c x^2\right )} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {f+g x+h x^2}{(d+e x)^2 \left (a+b x+c x^2\right )} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` for more deta
Time = 0.27 (sec) , antiderivative size = 459, normalized size of antiderivative = 1.45 \[ \int \frac {f+g x+h x^2}{(d+e x)^2 \left (a+b x+c x^2\right )} \, dx=-\frac {{\left (2 \, c d e f - b e^{2} f - c d^{2} g + a e^{2} g + b d^{2} h - 2 \, a d e h\right )} \log \left (c - \frac {2 \, c d}{e x + d} + \frac {c d^{2}}{{\left (e x + d\right )}^{2}} + \frac {b e}{e x + d} - \frac {b d e}{{\left (e x + d\right )}^{2}} + \frac {a e^{2}}{{\left (e x + d\right )}^{2}}\right )}{2 \, {\left (c^{2} d^{4} - 2 \, b c d^{3} e + b^{2} d^{2} e^{2} + 2 \, a c d^{2} e^{2} - 2 \, a b d e^{3} + a^{2} e^{4}\right )}} - \frac {\frac {e^{3} f}{e x + d} - \frac {d e^{2} g}{e x + d} + \frac {d^{2} e h}{e x + d}}{c d^{2} e^{2} - b d e^{3} + a e^{4}} + \frac {{\left (2 \, c^{2} d^{2} e^{2} f - 2 \, b c d e^{3} f + b^{2} e^{4} f - 2 \, a c e^{4} f - b c d^{2} e^{2} g + 4 \, a c d e^{3} g - a b e^{4} g + b^{2} d^{2} e^{2} h - 2 \, a c d^{2} e^{2} h - 2 \, a b d e^{3} h + 2 \, a^{2} e^{4} h\right )} \arctan \left (\frac {2 \, c d - \frac {2 \, c d^{2}}{e x + d} - b e + \frac {2 \, b d e}{e x + d} - \frac {2 \, a e^{2}}{e x + d}}{\sqrt {-b^{2} + 4 \, a c} e}\right )}{{\left (c^{2} d^{4} - 2 \, b c d^{3} e + b^{2} d^{2} e^{2} + 2 \, a c d^{2} e^{2} - 2 \, a b d e^{3} + a^{2} e^{4}\right )} \sqrt {-b^{2} + 4 \, a c} e^{2}} \]
-1/2*(2*c*d*e*f - b*e^2*f - c*d^2*g + a*e^2*g + b*d^2*h - 2*a*d*e*h)*log(c - 2*c*d/(e*x + d) + c*d^2/(e*x + d)^2 + b*e/(e*x + d) - b*d*e/(e*x + d)^2 + a*e^2/(e*x + d)^2)/(c^2*d^4 - 2*b*c*d^3*e + b^2*d^2*e^2 + 2*a*c*d^2*e^2 - 2*a*b*d*e^3 + a^2*e^4) - (e^3*f/(e*x + d) - d*e^2*g/(e*x + d) + d^2*e*h /(e*x + d))/(c*d^2*e^2 - b*d*e^3 + a*e^4) + (2*c^2*d^2*e^2*f - 2*b*c*d*e^3 *f + b^2*e^4*f - 2*a*c*e^4*f - b*c*d^2*e^2*g + 4*a*c*d*e^3*g - a*b*e^4*g + b^2*d^2*e^2*h - 2*a*c*d^2*e^2*h - 2*a*b*d*e^3*h + 2*a^2*e^4*h)*arctan((2* c*d - 2*c*d^2/(e*x + d) - b*e + 2*b*d*e/(e*x + d) - 2*a*e^2/(e*x + d))/(sq rt(-b^2 + 4*a*c)*e))/((c^2*d^4 - 2*b*c*d^3*e + b^2*d^2*e^2 + 2*a*c*d^2*e^2 - 2*a*b*d*e^3 + a^2*e^4)*sqrt(-b^2 + 4*a*c)*e^2)
Time = 28.23 (sec) , antiderivative size = 3991, normalized size of antiderivative = 12.63 \[ \int \frac {f+g x+h x^2}{(d+e x)^2 \left (a+b x+c x^2\right )} \, dx=\text {Too large to display} \]
(log(d + e*x)*(e^2*(a*g - b*f) + d^2*(b*h - c*g) - d*e*(2*a*h - 2*c*f)))/( a^2*e^4 + c^2*d^4 + b^2*d^2*e^2 - 2*a*b*d*e^3 - 2*b*c*d^3*e + 2*a*c*d^2*e^ 2) + (log(2*a*b^3*e^4*f - 2*b^2*c^2*d^4*g - 2*a^2*b^2*e^4*g + 6*a*c^3*d^4* g + b*c^3*d^4*f + a^3*b*e^4*h + 6*a^3*c*e^4*g + 2*b^3*c*d^4*h + 2*b^4*e^4* f*x + 2*c^4*d^4*f*x - c^3*d^4*f*(b^2 - 4*a*c)^(1/2) + a^3*e^4*h*(b^2 - 4*a *c)^(1/2) - 7*a^2*b*c*e^4*f - 7*a*b*c^2*d^4*h - 16*a*c^3*d^3*e*f - 16*a^3* c*d*e^3*h - 2*a*b^3*e^4*g*x - 2*a*c^3*d^4*h*x - b*c^3*d^4*g*x - 2*a^3*c*e^ 4*h*x + 2*a*b^2*e^4*f*(b^2 - 4*a*c)^(1/2) - 2*a^2*b*e^4*g*(b^2 - 4*a*c)^(1 /2) - a^2*c*e^4*f*(b^2 - 4*a*c)^(1/2) + a*c^2*d^4*h*(b^2 - 4*a*c)^(1/2) + 2*b*c^2*d^4*g*(b^2 - 4*a*c)^(1/2) - 2*b^2*c*d^4*h*(b^2 - 4*a*c)^(1/2) + 2* b^3*e^4*f*x*(b^2 - 4*a*c)^(1/2) + 3*c^3*d^4*g*x*(b^2 - 4*a*c)^(1/2) + 16*a ^2*c^2*d*e^3*f - a*b^3*d^2*e^2*h + 2*a^2*b^2*d*e^3*h + 2*b^2*c^2*d^3*e*f - b^3*c*d^2*e^2*f + 16*a^2*c^2*d^3*e*h + 2*a^2*c^2*e^4*f*x + a^2*b^2*e^4*h* x + b^2*c^2*d^4*h*x - b^4*d^2*e^2*h*x - 20*a^2*c^2*d^2*e^2*g + 14*a*c^2*d^ 2*e^2*f*(b^2 - 4*a*c)^(1/2) - a*b^2*d^2*e^2*h*(b^2 - 4*a*c)^(1/2) + b^2*c* d^2*e^2*f*(b^2 - 4*a*c)^(1/2) - 14*a^2*c*d^2*e^2*h*(b^2 - 4*a*c)^(1/2) - b ^3*d^2*e^2*h*x*(b^2 - 4*a*c)^(1/2) + 10*b^2*c^2*d^2*e^2*f*x + 28*a^2*c^2*d ^2*e^2*h*x - 6*a*b^2*c*d*e^3*f + 4*a*b*c^2*d^3*e*g + 4*a^2*b*c*d*e^3*g - 6 *a*b^2*c*d^3*e*h - 8*a*b^2*c*e^4*f*x + 7*a^2*b*c*e^4*g*x + 2*a*b^3*d*e^3*h *x + 16*a*c^3*d^3*e*g*x - 4*b*c^3*d^3*e*f*x - 8*b^3*c*d*e^3*f*x + 2*b^3...